package us.styx.net;

import java.io.IOException;
import java.nio.channels.SelectionKey;

/*
 * Handles the three possible events derived from the selector.
 */
public interface NetworkEvent {
    /*
     * Accepts an incoming connection.
     */
    void acceptConnection(SelectionKey key);

    /*
     * Reads the incoming transmissions.
     */
    void readData(SelectionKey key) throws IOException;

    /*
     * Returns viable data.
     */
    void writeData(SelectionKey key);
}